#ifndef BOOKMSG_H
#define BOOKMSG_H

#include <QWidget>
#include <QMouseEvent>
#include <QListWidget>
#include <QMessageBox>

#include "sqlite.h"
#include "keyboard.h"

namespace Ui {
class BookMsg;
}

class BookMsg : public QWidget
{
    Q_OBJECT

public:
    explicit BookMsg(QString book, QWidget *parent = nullptr);
    ~BookMsg();
    enum{
        NUM_ROLE,
        SELL_ROLE,
    }choose;

    Book_t book;
    KeyBoard *key;
    bool eventFilter(QObject *watched, QEvent *event)override;
    void mouseReleaseEvent(QMouseEvent *)override;
    void deleteBtn_click();
public slots:
    void keyPress(QString ch);
private slots:
    void on_pushButton_clicked();

private:
    Ui::BookMsg *ui;
};

#endif // BOOKMSG_H
